Altitude Hold Setup Using SU04 via I2C with Crossflight, Mini Pix, and PIXHAWK
(Open-Source Firmware v4.3 and Above)
Configuration Instructions (Altitude Hold Function)
RNGFND1_. As shown in the figure below, set RNGFND1_TYPE it to 2, then click Write Parameters.RNGFND1_MAX_CM to 450RNGFND1_MIN_CM to 43 (unit: cm)RNGFND1_ORIENT to 25Parameter Descriptions
RNGFND1_MAX_CM: The maximum distance that the flight controller can recognize from the module in altitude hold mode.RNGFND1_MIN_CM: The minimum distance that the flight controller can realize from the module in altitude hold mode.Viewing Ultrasonic Sensor Data
1. Viewing ultrasonic data in the Quick interface
Connect the flight controller to the Mission Planner. In the Quick interface, double-click the tab to bring up a large list. Select sonarrange, and the ultrasonic height data will be displayed in that position.


2. Viewing ultrasonic data in the Debug interface
Enable the debug option in the ground station. Double-click the pop-up dynamic table, select sonarrange from the list, and the real-time waveform of the ultrasonic data will be displayed, as shown in the figure below.

